Optimal. Leaf size=172 \[ -\frac {2 \cos (e+f x) \sqrt {a+b \sin (e+f x)}}{3 f}+\frac {2 a E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{3 b f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{3 b f \sqrt {a+b \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2832, 2831,
2742, 2740, 2734, 2732} \begin {gather*} -\frac {2 \left (a^2-b^2\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 b f \sqrt {a+b \sin (e+f x)}}-\frac {2 \cos (e+f x) \sqrt {a+b \sin (e+f x)}}{3 f}+\frac {2 a \sqrt {a+b \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{3 b f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2832
Rubi steps
\begin {align*} \int \sin (e+f x) \sqrt {a+b \sin (e+f x)} \, dx &=-\frac {2 \cos (e+f x) \sqrt {a+b \sin (e+f x)}}{3 f}+\frac {2}{3} \int \frac {\frac {b}{2}+\frac {1}{2} a \sin (e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx\\ &=-\frac {2 \cos (e+f x) \sqrt {a+b \sin (e+f x)}}{3 f}+\frac {a \int \sqrt {a+b \sin (e+f x)} \, dx}{3 b}-\frac {\left (a^2-b^2\right ) \int \frac {1}{\sqrt {a+b \sin (e+f x)}} \, dx}{3 b}\\ &=-\frac {2 \cos (e+f x) \sqrt {a+b \sin (e+f x)}}{3 f}+\frac {\left (a \sqrt {a+b \sin (e+f x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}} \, dx}{3 b \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {\left (\left (a^2-b^2\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{3 b \sqrt {a+b \sin (e+f x)}}\\ &=-\frac {2 \cos (e+f x) \sqrt {a+b \sin (e+f x)}}{3 f}+\frac {2 a E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{3 b f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{3 b f \sqrt {a+b \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.67, size = 143, normalized size = 0.83 \begin {gather*} -\frac {2 \left (b \cos (e+f x) (a+b \sin (e+f x))+a (a+b) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}-\left (a^2-b^2\right ) F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right )}{3 b f \sqrt {a+b \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(459\) vs.
\(2(222)=444\).
time = 3.42, size = 460, normalized size = 2.67
method | result | size |
default | \(\frac {\frac {2 \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (f x +e \right )\right ) b}{a -b}}\, \EllipticF \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{2} b}{3}-\frac {2 \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (f x +e \right )\right ) b}{a -b}}\, \EllipticF \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) b^{3}}{3}-\frac {2 \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (f x +e \right )\right ) b}{a -b}}\, \EllipticE \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{3}}{3}+\frac {2 \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) b}{a +b}}\, \sqrt {-\frac {\left (1+\sin \left (f x +e \right )\right ) b}{a -b}}\, \EllipticE \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a \,b^{2}}{3}+\frac {2 \left (\sin ^{3}\left (f x +e \right )\right ) b^{3}}{3}+\frac {2 \left (\sin ^{2}\left (f x +e \right )\right ) a \,b^{2}}{3}-\frac {2 b^{3} \sin \left (f x +e \right )}{3}-\frac {2 a \,b^{2}}{3}}{b^{2} \cos \left (f x +e \right ) \sqrt {a +b \sin \left (f x +e \right )}\, f}\) | \(460\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.11, size = 420, normalized size = 2.44 \begin {gather*} \frac {-3 i \, \sqrt {2} a \sqrt {i \, b} b {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (f x + e\right ) - 3 i \, b \sin \left (f x + e\right ) - 2 i \, a}{3 \, b}\right )\right ) + 3 i \, \sqrt {2} a \sqrt {-i \, b} b {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (f x + e\right ) + 3 i \, b \sin \left (f x + e\right ) + 2 i \, a}{3 \, b}\right )\right ) - 6 \, \sqrt {b \sin \left (f x + e\right ) + a} b^{2} \cos \left (f x + e\right ) - \sqrt {2} {\left (2 \, a^{2} - 3 \, b^{2}\right )} \sqrt {i \, b} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (f x + e\right ) - 3 i \, b \sin \left (f x + e\right ) - 2 i \, a}{3 \, b}\right ) - \sqrt {2} {\left (2 \, a^{2} - 3 \, b^{2}\right )} \sqrt {-i \, b} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (f x + e\right ) + 3 i \, b \sin \left (f x + e\right ) + 2 i \, a}{3 \, b}\right )}{9 \, b^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sin {\left (e + f x \right )}} \sin {\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sin \left (e+f\,x\right )\,\sqrt {a+b\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________